﻿
@{
    ViewBag.Title = "MakingsCirculation";
}

<style type="text/css">
    .return{
        width:80px;
        position:fixed;
        right:100px;
        top:400px;
        z-index:100;
    }
    form{
        background: white;
        padding-left:7%;
        padding-right:7%;
        padding-bottom:2%;
        padding-top:2%;
    }

    .table,.table>tbody>tr>td{
        border:1px solid ;
        font-size:15px;
        vertical-align: middle;
    }
    
    textarea{
        resize:none;
    }

    .page_title {
        width: 100%;
        height: 55px;
        color: #000;
        font-size: 25px;
        line-height: 55px;
        text-align: center;
        font-weight: 700;
    }

    .table_number {
        color: #000;
        font-size:18px;
    }

    .ShroffMakings {
        height:350px;
        width:100%;
        overflow:auto;
    }
    .border_none{
        border:none;
        outline:none;
        width:100%;
    }
    .Remarks{
        width:100%;
    }
</style>
<a class="btn btn-default return" href="javascript: self.location=document.referrer;">返&nbsp;&nbsp;回</a>
<form action="/As/SubmitMakingsCirculation" method="post">
    <div class="page_title">西科大鉴定材料流转单</div>
    <div class="table_number">
        表格编号：
        <span name="TableNumber">@ViewBag.TableNumber</span>
        <input name="ShroffId" type="hidden" value="@ViewBag.ShroffId" />
    </div>
    <table class="makingsCirculation_table table">
        <tr>
            <td>委托人</td>
            <td>@ViewBag.Client</td>
            <td>被鉴定人</td>
            <td>@ViewBag.be_appraiser_name</td>
        </tr>
        <tr>
            <td>
                <div style="width:23px;margin:auto;margin-top:7%;">鉴定材料︵</br />包括材料名称和数量</br />︶</div>
            </td>
            <td colspan="3">
                <textarea name="ShroffMakings" class="border_none ShroffMakings">@ViewBag.mak_ShroffMakings</textarea>
            </td>
        </tr>
        @{
            Dictionary<string, string> m = (ViewBag.mak_MakingsReceptionPeoples) as Dictionary<string, string>;
            List<string> m2 = new List<string>();
            if (m.Count > 0)
            {
                m2 = new List<string>(m.Keys);
                for (int i = 0; i < m2.Count - 1; i++)
                {
                    <tr>
                        <td>第(@(i + 1))鉴定资料收领人</td>
                        <td>
                            <input class="border_none" name="MakingsReceptionPeoples" value="@m2[i]" />
                        </td>
                        <td>收领日期</td>
                        <td>
                            <input class="border_none" name="MakingsReceptionPeoples" value="@m[m2[i]]" />
                        </td>
                    </tr>
                }
                for (int i = 0; i < 5 - m2.Count; i++)
                {
                    <tr>
                        <td>第(@(m2.Count + i))鉴定资料收领人</td>
                        <td>
                            <input class="border_none" name="MakingsReceptionPeoples" value="" />
                        </td>
                        <td>收领日期</td>
                        <td>
                            <input class="border_none" name="MakingsReceptionPeoples" value="" />
                        </td>
                    </tr>
                }
            }
            else
            {
                for (int i = 0; i < 5; i++)
                {
                    <tr>
                        <td>第(@(i + 1))鉴定资料收领人</td>
                        <td>
                            <input class="border_none" name="MakingsReceptionPeoples" value="" />
                        </td>
                        <td>收领日期</td>
                        <td>
                            <input class="border_none" name="MakingsReceptionPeoples" value="" />
                        </td>
                    </tr>
                }
            }
        <tr>
            <td>档案室资料收领人</td>
            <td>
                <input class="border_none" name="MakingsReceptionPeoples" value="@(m.Count > 0?m2[m.Count - 1]:"")" required />
            </td>
            <td>归档日期</td>
            <td>
                <input class="border_none" name="MakingsReceptionPeoples" value="@(m.Count > 0?m[m2[m.Count - 1]]:"")" required />
            </td>
        </tr>
        }
        <tr>
            <td>备注</td>
            <td colspan="3" name="Remarks">
                <input class="border_none Remarks" name="Remarks" value="@ViewBag.mak_Remarks" />
            </td>
        </tr>
        <tr>
            <td colspan="4" class="text-center">
                <button type="submit" class="btn btn-block">下一步</button>
            </td>
        </tr>
    </table>
</form>
<script type="text/javascript">
    $(function () {
        var trs = $('.makingsCirculation_table tr');
        for (var i = 0; i < trs.length; i++) {
            $(trs[i]).children('td').eq(0).css({ width: 200 });
            $(trs[i]).children('td').eq(1).css({ width: 380 });
            $(trs[i]).children('td').eq(2).css({ width: 150 });
        }
    });
</script>

